import { onMounted,onUnmounted } from "vue";


export function useEvent(traget,event,callback){
  onMounted(()=>traget.addEventListener(event,callback))
  onUnmounted(()=>traget.removeEventListener(event,callback))
}